<?php
namespace app\index\controller\user;
use app\index\model\UsersAddress;
class AddressControl extends \app\index\controller\user\BaseUser{
    public function index(){
        $users_address = new UsersAddress();
        $rows = $users_address->where('users_id',$this->userdata['id'])
                                 ->order('id','desc')
                                 ->paginate(3);
        $total = $users_address->where('users_id',$this->userdata['id'])
                                  ->count();                              
        $data = [
            'rows' => $rows,
            'total' => $total,
        ];
        return view('user/addressControl',$data);
    }
}